package com.eight.cloud.payment.model.vo;

import lombok.Data;

import java.io.Serializable;

/**
 * 通知响应实体
 *
 * @ClassName: NoticeVo
 * @Author: TXC
 * @Date: 2024-11-29 16:12
 **/
@Data
public class NoticeVo implements Serializable {
    private String code;
    private String message;

    public NoticeVo(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static NoticeVo ok() {
        return ok(null);
    }

    public static NoticeVo ok(String message) {
        return new NoticeVo("SUCCESS", message);
    }

    public static NoticeVo fail() {
        return fail(null);
    }

    public static NoticeVo fail(String message) {
        return new NoticeVo("FAIL", message);
    }
}
